//
//  UUIDHelper.h
//  Protocol
//
//  Created by  user on 11-1-10.
//  Copyright 2011 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef struct _GUID
{
    UInt8 byte0;
    UInt8 byte1;
    UInt8 byte2;
    UInt8 byte3;
    UInt8 byte4;
    UInt8 byte5;
    UInt8 byte6;
    UInt8 byte7;
    UInt8 byte8;
    UInt8 byte9;
    UInt8 byte10;
    UInt8 byte11;
    UInt8 byte12;
    UInt8 byte13;
    UInt8 byte14;
    UInt8 byte15;
} GUID;

@interface XMSGUID : NSObject

@property(nonatomic, assign) GUID guid;

- (id)initWithGUID:(GUID)guid;

- (id)init;

- (NSString*)toLowString;

- (NSString*)toString;

- (BOOL)isEqualToCGUID:(XMSGUID *)guid;

+ (XMSGUID*)newGuid;

+ (void)resetGUID:(GUID *)guid;

+ (GUID)emptyGUID;

+ (NSString *)GUIDString;

+ (NSString *)GUIDLowString;

+ (GUID)GUIDBytes;

+ (NSString *)GUIDStringWithGUIDBytes:(GUID)guid;

+ (NSString *)GUIDLowStringWithGUIDBytes:(GUID)guid;

+ (GUID)GUIDBytesWithGUIDString:(NSString *)str;

+ (NSInteger)compareGUID:(GUID)p other:(GUID)q;

+ (BOOL)isEmptyGUID:(GUID)guid;

+ (BOOL)isEmptyGUIDString:(NSString*)szGuid;


@end
